-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added onAvatarPress #264
Added onAvatarPress #264
Conversation
@@ -118,7 +118,7 @@ See [example/App.js](example/App.js) | |||
- **`renderSend`** _(Function)_ - render the send button | |||
- **`renderAccessory`** _(Function)_ - renders a second line of actions below the message composer | |||
- **`bottomOffset`** _(Integer)_ - distance of the chat from the bottom of the screen, useful if you display a tab bar | |||
|
|||
- **`onAvatarPress`** _(Function)_ - Called when Avatar is presses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that you have a typo on «presses». It should be «pressed».
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to combine the commits squashing them
+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @SunnyGurnani! Could you please rebase so we can merge it?
@@ -27,6 +27,7 @@ export default class Avatar extends React.Component { | |||
<View style={[styles[this.props.position].container, this.props.containerStyle[this.props.position]]}> | |||
<GiftedAvatar | |||
avatarStyle={StyleSheet.flatten([styles[this.props.position].image, this.props.imageStyle[this.props.position]])} | |||
onPress={this.props.onAvatarPress} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't want onPress
here because this is actually a blank avatar that isn't visible.
This PR can be closed in favor of #427 (rebased). |
GiftedAvatar already had onPress but was not being utilized. Added onAvatarPress () function.